<?php
/**
 * Created by PhpStorm.
 * User: zhaojia
 * Date: 15-9-8
 * Time: 下午5:54
 */
namespace Home\Controller;
use Think\Controller;

class ContentController extends Controller{
    private $_model;
    function _initialize(){
        $this->_model=D('Article');
    }

    public function index(){
        $id=$_GET['aid'];
        $where=array('aid'=>$id);
        //文章表
        $arc=$this->_model->get_data($where);
        //数据表
        $shuju=D('ArticleData')->get_data(array('article_aid'=>$id));
        $this->assign('arc',$arc);
        $this->assign('shuju',$shuju);
        $this->display();
    }
}